package com.ktjy.controller;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller("userController")
public class UserController {

    @RequestMapping(value = "/zhangsan")
    public String user(Model model, HttpServletRequest req, HttpServletResponse res) {
        model.addAttribute("name", "张三");
        model.addAttribute("age", "85");
        return "zhangsan";
    }

    @RequestMapping(path = "/lisi")
    public String user1(Model model) {
        model.addAttribute("name", "俗话");
        model.addAttribute("age", "56");
        return "lisi";
    }
}
